package controllers;

import javax.faces.context.FacesContext;

/**
 * Created by IntelliJ IDEA.
 * User: mikhail.krupitskiy
 * Date: 03.11.2010
 * Time: 14:42:41
 * To change this template use File | Settings | File Templates.
 */
public class Login {
    String g;

    public String getUserName() {
        return userName;
    }

    public String getPassword() {
        return password;
    }

    private String userName;
    private String password;

    public void doLogin() throws Exception {
        FacesContext jsf = FacesContext.getCurrentInstance();
        jsf.getExternalContext().dispatch("/j_spring_security_check");
        jsf.responseComplete();
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
